<template>
  <div class="keypad">
    <ul class='keys'>
      <li class="letter" @click="OnKey(1)">1</li>
      <li class="letter" @click="OnKey(2)">2</li>
      <li class="letter" @click="OnKey(3)">3</li>
      <li class="letter" @click="OnKey(4)">4</li>
      <li class="letter" @click="OnKey(5)">5</li>
      <li class="letter" @click="OnKey(6)">6</li>
      <li class="letter" @click="OnKey(7)">7</li>
      <li class="letter" @click="OnKey(8)">8</li>
      <li class="letter" @click="OnKey(9)">9</li>
      <li class="letter" @click="OnKey('X')">X</li>
      <li class="letter" @click="OnKey(0)">0</li>
      <li class="del" @click="OnKey(-1)">删</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "Keypad",
  data() {
    return {
	  }
  },
   props: {

  },
  methods: {
    OnKey(num) { 
      this.$emit('OnKey', num);
    },
  }
};
</script>

<style>
  .keypad {
    background-color: rgb(188, 190, 192);
    width: 100%;
    height: 100%;
  }
  .keys {
    margin: 0 5px 0 5px;
    height: 100%;
    padding: 0;
    list-style: none;
    color: #2b587a;
  }
  .keys ul{
    position: relative;
    height: 100%;
  }
  .keys li {
    float: left;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29%;
    height: 22%;
    line-height: 40px;
    text-align: center;
    background: #fff;
    border: 1px solid #f9f9f9;
    border-radius: 5px;
    margin:2% 0 0 2.5%;
    font-family: tahoma, arial, verdana, sans-serif, 'Lucida Sans';
    font-size: 22px;
    font-weight: bold;
  }
  .del {
    margin:2px 2px 2px 2px;
    font-family: tahoma, arial, verdana, sans-serif, 'Lucida Sans';
    font-size: 22px;
    font-weight: bold;
  }
</style>














































































